<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //10的阶乘
    var n = 10;
    var m = 1;
    while (n > 0) {
        if (n===1){
            document.write(n)
        }else {
            document.write(n+'*')
        }
        m *= n
        n--
    }
    document.write('='+m)
</script>
</body>
</html>